import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-platform/workshopManage/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/blade-platform/workshopmanagetable/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (ids) => {
  return request({
    url: `/api/blade-platform/workshopManage/remove/${ids}`,
    method: 'get',
  })
}

export const add = (row) => {
  return request({
    url: '/api/blade-platform/workshopManage/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/blade-platform/workshopManage/update',
    method: 'post',
    data: row
  })
}
/*人员接口*/

export const getUserList = (type) => {
  return request({
    url: `/api/blade-user/getUser/${type}`,
    method: 'get',
  })
}
/*场地下拉框*/
export const getSiteList = () => {
  return request({
    url: `/api/blade-platform/workshopManage/getSiteList`,
    method: 'get',
  })
}

